import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { usePersist } from 'pinia-use-persist'
import * as Icons from '@ant-design/icons-vue'
import 'ant-design-vue/es/message/style/css'
import 'ant-design-vue/es/modal/style/css'
import 'virtual:svg-icons-register'
import SvgIcon from '@/components/SvgIcon/index.vue'

import App from './App.vue'
import router from './router'

const app = createApp(App as any)
const pinia = createPinia()
pinia.use(usePersist)

app.use(router)
app.use(pinia)

const icons: any = Icons
for (const i in icons) {
  app.component(i, icons[i])
}

app.mount('#app')
app.component('SvgIcon', SvgIcon)
